from rest_framework.serializers import ModelSerializer
from apps.Info.models import InfoModels


class InfoModelsSerializer(ModelSerializer):
    class Meta:
        model = InfoModels
        fields = '__all__'
        depth = 2


class CreateInfoModelsSerializer(InfoModelsSerializer):
    class Meta:
        model = InfoModels
        fields = '__all__'
        depth = 2
        read_only_fields = ["ChangeInfo", "Successfully_Info"]


class UpdateInfoModelsSerializer(InfoModelsSerializer):
    class Meta:
        model = InfoModels
        fields = ['Successfully_Info']
        depth = 2
